{% set page_name = "展示徽章" %}
{% extends "badge_base.html" %}
{% import "components/paginator.html" as paginator with context %}
{% import "components/nothing.html" as nothing with context %}
{% block badge_content %}
<div class="section">
    <div class="section__header">
        <h1 class="section__title">{{ _('展示徽章') }}</h1>
    </div>
    <div class="section__body no-padding">
        {% if not udocs.length %}
        {{ nothing.render('现在还没人展示徽章……') }}
        {% else %}
        <table class="data-table">
            <colgroup>
                <col class="col--uid" style="width:5rem">
                <col class="col--user">
            </colgroup>
            <thead>
                <tr>
                    <th>{{ _('User ID') }}</th>
                    <th>{{ _('Username') }}</th>
                </tr>
            </thead>
            <tbody>
                {%- for udoc in udocs -%}
                <tr>
                    <td>{{ udoc._id }}</td>
                    <td>{{ user.render_inline(udoc,levelbadge=false) }}</td>
                </tr>
                {%- endfor -%}
            </tbody>
        </table>
        {{ paginator.render(page, upcount) }}
        {% endif %}
    </div>
</div>
{% endblock %}
